<span style="display: none" id="CURRENT_USER"
      th:if="${!#strings.isEmpty(session.SPRING_SECURITY_CONTEXT)}"
      th:text="${session.SPRING_SECURITY_CONTEXT.authentication.principal.name}"></span>
<script th:replace="authority/common/compatible_with_ie8_footer"></script>
<!--<script type="text/javascript" th:src="@{/authority/js/jquery-3.3.1.min.js}"></script>-->
<script type="text/javascript" th:src="@{/authority/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/authority/js/httptTools.js}"></script>
<script th:inline="javascript">

    // 获取项目名
    /*<![CDATA[*/
    content_path = /*[[@{/}]]*/ '';
    /*]]>*/
    // 获取用户
    var CURRENT_USER_NAME = $('#CURRENT_USER').html() || 'ANONYMOUS';
    layui.data('user', {
        key: 'user',
        value: CURRENT_USER_NAME
    });
    // 设置模块路径
    layui.config({
        version: "3.0.7"
        , base: content_path + 'authority/static/mods/'
    });

    $.extend(layui, {
        saveCache: function (key, value) {
            layui.data(layui.data('user')['user'], {key: key, value: value});
        },
        removeCache: function (key) {
            layui.data(layui.data('user')['user'], {key: key, remove: true});
        },
        obtainCache: function (key) {
            return layui.data(layui.data('user')['user'])[key];
        },
        clearCache: function () {
            return layui.data(layui.data('user')['user'], null);
        },
        page_table_examples: [],
        pageObtainTable: function (id) {
            var that_table;
            $.each(layui.page_table_examples, function (i, e) {
                if (e.config.id === id || e.config.index === id) return that_table = e, false;
            });
            return that_table;
        }
    });

</script>